const mongoose = require('../db');
const Schema = mongoose.Schema;
// const ObjectId = Schema.ObjectId;
const questionSchema = new Schema({
    _id: String,
    question_name: String,
    options: Array,
    answer: String,
    type: String,
    createtime: {type: Date, default: Date.now}
})


// userSchema.statics.login = (params, callback) => {
//     console.log(params)
//     return this.model('user').find({name: params.name}, callback);
// }

var Question = mongoose.model('questions', questionSchema, 'questions');

// User.find({}).then((res) => {
//     console.log(res)
// })
module.exports = Question


